<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Extended Item Generation-Time Support</title>
<style>@import url("file:/C:/eclipse/Eclipse 3.2/plugins/org.eclipse.sdk_3.2.0.v20060214/book.css");</style>
<style>@import url("file:/C:/eclipse/Eclipse 3.2/configuration/org.eclipse.osgi/bundles/120/1/.cp/schema.css");</style>
</HEAD>
<BODY>
<H1><CENTER>Extended Item Generation-Time Support</CENTER></H1>
<p></p>
<h6 class=CaptionFigColumn id=header>Identifier: </h6>org.eclipse.birt.report.engine.reportitemgeneration<p></p>
<h6 class=CaptionFigColumn id=header>Since: </h6>1.0
<p></p>

<p>
<h6 class=CaptionFigColumn id=header>Description: </h6>This extension point specifies how the new report item should be instantiated,  processed, and persisted at report generation time. In a server environment, the plugin registry uses this extension point registration to discover supported report item extensions.</p>
<p><h6 class=CaptionFigColumn id=header>Configuration Markup:</h6></p>
<p class=code id=dtd>&lt;!ELEMENT <a name="e.extension">extension</a> (<a href="#e.reportItem">reportItem</a>+)&gt;</p>
<p class=code id=dtd>&lt;!ATTLIST extension</p>
<p class=code id=dtdAttlist>point&nbsp;CDATA #REQUIRED<p class=code id=dtdAttlist>id&nbsp;&nbsp;&nbsp;&nbsp;CDATA #IMPLIED<p class=code id=dtdAttlist>name&nbsp;&nbsp;CDATA #IMPLIED&gt;</p>
<p></p>
<ul class=ConfigMarkup id=attlistDesc>
<li><b>point</b> - a fully qualified identifier of the target extension point</li>
<li><b>id</b> - an optional identifier of the extension instance</li>
<li><b>name</b> - an optional name of the extension instance</li>
</ul>
<br><p class=code id=dtd>&lt;!ELEMENT <a name="e.reportItem">reportItem</a> EMPTY&gt;</p>
<p class=code id=dtd>&lt;!ATTLIST reportItem</p>
<p class=code id=dtdAttlist>name&nbsp;&nbsp;CDATA #REQUIRED<p class=code id=dtdAttlist>class&nbsp;CDATA #REQUIRED&gt;</p>
<p></p>
<ul class=ConfigMarkup id=attlistDesc>
<li><b>name</b> - the unique name of the extended item, i.e., "org.eclipse.birt.chart" for chart extension.</li>
<li><b>class</b> - the fully qualified name of the java class that implements <code>IReportItemGeneration</code></li>
</ul>
<br><h6 class=CaptionFigColumn id=header>Examples: </h6>The following is a sample usage of the reportItemGeneration extension point:

<p>
<pre>
<p class=code id=tag>&lt;extension point=<p class=code id=cstring>&quot;org.eclipse.birt.report.engine.reportitemGeneration&quot;</p><p class=code id=tag> name=<p class=code id=cstring>&quot;chart generation extension&quot;</p><p class=code id=tag>&gt;</p>
  <p class=code id=tag>&lt;reportItem name=<p class=code id=cstring>&quot;chart&quot;</p><p class=code id=tag> class=<p class=code id=cstring>&quot;org.eclipse.birt.report.chartitem.ChartGeneration&quot;</p><p class=code id=tag> createReportQuery=<p class=code id=cstring>&quot;item&quot;</p><p class=code id=tag>/&gt;</p>
 <p class=code id=tag>&lt;/extension&gt;</p>
 </pre>
 </p>
<p></p>

<h6 class=CaptionFigColumn id=header>API Information: </h6>The value of the class attribute must be the fully qualified name of a class that implements <code>org.eclipse.birt.engine.extension.IReportItemGeneration</code>. The interface provides the following functions:

<ul>
<li><code>public void setModelObject(ExtendedItemHandle handle)</code> ---- 
 passes the model object to the extension provider. </li>
<li><code>public void onRowSets(IRowSet[] rowSets) throws BirtException</code> ----
processes the extended item in report generation environment. The data that the report item needs is passed in through the rowSets array</li>
<li><code>public boolean needSerialization() </code> ----
returns whether the extended item has anything to be serialized to report document.</li>
<li><code>public void serialize(OutputStream ostream) throws BirtException</code> ---- 
serializes the extended item generation time state. The application developer should not assume that the output stream is a file stream. Engine only guarantees that a corresponding input stream is available for deserializing what is written by this function.</li>
<li><code>public void Size getSize()</code> ---- 
gets the size of the extended item. The size is a Dimension object. The width and height can only be in absolute units (inch, mm, etc.) or pixel. It can not be a relative size such as 150% or 1.2em. An extended item can obtain its design-time size information by querying DE. This function is needed because the actual size may not be the same as the design-time size.</li>
<li><code>public void finish()</code> ---- 
performs cleanup jobs</li>
</ul>
<p>
<p></p>

<h6 class=CaptionFigColumn id=header>Supplied Implementation: </h6>Chart as an extended item
<p></p>

<br>
<p class=note id=copyright>
Copyright (c) 2005 Actuate Corporation. All rights reserved. This program and 
the accompanying materials are made available under the terms of the Eclipse 
Public License v2.0 which accompanies this distribution, and is available at 
https://www.eclipse.org/legal/epl-2.0/<br/><br/>

Contributors: Actuate Corporation - initial API and implementation
<p></p>

</p>
</BODY>
</HTML>
